package jym.tan.movielibrary.component.ui.frame;

import java.io.IOException;

import jym.tan.movielibrary.component.base.BaseFrame;
import jym.tan.movielibrary.constant.ComponentConstant;
import jym.tan.movielibrary.factory.ComponentFactory;
import jym.tan.movielibrary.factory.ImageFactory;
import jym.tan.movielibrary.factory.LayoutFactory;

public class LibraryFrame extends BaseFrame<LibraryFrame> {

	private static final long serialVersionUID = 2L;

	@Override
	public void initialize() {
		setLayout(LayoutFactory.getMigFillLayout());
		setDefaultCloseOperation(EXIT_ON_CLOSE);	
		setTitle(ComponentConstant.Title.LIBRARY_FRAME);
		try {
			setIconImage(ImageFactory.getFaviconImage());
		} catch (IOException e) {
			e.printStackTrace();
		}
        setContentPane(ComponentFactory.getLibraryTablePanel());
        setToolBar(ComponentFactory.getDefaultToolBar());
        setJMenuBar(ComponentFactory.getDefaultMenuBar());
        pack();
		setLocationRelativeTo(null);	
	}
}
